package com.norbitltd.guavaleaves.java.lang;

import org.apache.commons.lang3.BooleanUtils;

import com.google.common.base.Predicate;

public class BooleanPredicates extends ObjectPredicates {
	
	/**
	 * @see org.apache.commons.lang3.BooleanUtils.isFalse
	 */
	public Predicate<Boolean> isFalse() {
		return new Predicate<Boolean>() {
			public boolean apply(Boolean input) {
				return BooleanUtils.isFalse(input);
			}			
		};
	}
	
	/**
	 * @see org.apache.commons.lang3.BooleanUtils.isNotFalse
	 */
	public Predicate<Boolean> isNotFalse() {
		return new Predicate<Boolean>() {
			public boolean apply(Boolean input) {
				return BooleanUtils.isNotFalse(input);
			}
		};
	}
	
	/**
	 * @see org.apache.commons.lang3.BooleanUtils.isNotTrue
	 */
	public Predicate<Boolean> isNotTrue() {
		return new Predicate<Boolean>() {
			public boolean apply(Boolean input) {
				return BooleanUtils.isNotTrue(input);
			}
		};
	}
	
	/**
	 * @see org.apache.commons.lang3.BooleanUtils.isTrue
	 */
	public Predicate<Boolean> isTrue() {
		return new Predicate<Boolean>() {
			public boolean apply(Boolean input) {
				return BooleanUtils.isTrue(input);
			}
		};
	}
}
